package com.wms.controller;

import com.wms.bean.ResultBean;
import com.wms.core.R;
import com.wms.dto.SaveActualQtyCountDTO;
import com.wms.mapper.SaveTaskDetailActualQtyMapper;
import com.wms.service.SaveTaskDetailActualQtyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "skh-保存实际盘点数量")
public class SaveTaskDetailActualQtyController {

    @Autowired
    SaveTaskDetailActualQtyService saveTaskDetailActualQtyService;

    @PostMapping("/saveTaskDetailActualQty")
    @ApiOperation(value = "批量保存实际盘点数量")
    public ResultBean SaveTaskDetailActualQty(@RequestBody SaveActualQtyCountDTO saveActualQtyCountDTO){
        int rs = saveTaskDetailActualQtyService.SaveTaskDetailActualQty(saveActualQtyCountDTO);
        if (rs>0){
            return R.success("保存成功");
        }
        return R.fail("保存失败");
    }
}
